home *** CD-ROM | disk | FTP | other *** search
Oberon Text | 1990-10-18 | 2.3 KB | 48 lines | [.Ob./.Ob*] |
- Syntax10.Scn.Fnt
- Syntax10b.Scn.Fnt
- Syntax10i.Scn.Fnt
- MODULE Test; (* Simple Example *)
- IMPORT
- Texts, Oberon;
- W: Texts.Writer;
- PROCEDURE Do*;
- BEGIN
- Texts.WriteString(W, "Hello x"); Texts.WriteLn(W);
- Texts.Append(Oberon.Log, W.buf)
- END Do;
- BEGIN
- Texts.OpenWriter(W)
- END Test.
- 1. Move the cursor into this viewer and press the Enter key on the keypad.
- This will cause the viewer to be marked (a star will appear).
- 2. Execute the command Compiler.Compile * (press control key over it).
- A star as a parameter always indicates the marked viewer.
- 3. You may now invoke the new command Test.Do as often as you like.
- Just move the mouse cursor over it and press control.
- 4. Modify the program, for example by changing the text that is printed.
- 5. Compile again by invoking Compiler.Compile * as usual.
- 6. Execute Test.Do again: the changes you made in the program have no
- effect (yet), because the old version of module Test is still loaded.
- 7. You may (re-)load the latest version of a command by interclicking the
- mouse button during invocation (pressing the control key).
- 8. Error positions in the text may be located by selecting the error message
- "pos ... err ..." in the System.Log and executing Edit.Locate .
- Selecting the first character on the line is sufficient. The whole line
- may also be selected by double-clicking.
- Oberon Compiler Options
- The Oberon Compiler accepts the following options:
- s Enable generation of new Symbol File
- x Disable Index Checks
- n Disable NIL Checks
- t Disable Type Checks
- r Enable Range Checks
- g Suppress Garbage Collection after this Compilation
- Each file parameter may be followed by a slash ("/") and a list of options.
- If garbage collection is suppressed, compilation runs faster but might not
- be completed if too many files or too much memory are used. When you are
- compiling long lists of files, simply start out with garbage collection disabled
- and enable it just before those files at which the compiler generates a trap.
- Examples:
- Compiler.Compile */n
- Compiler.Compile ddt.Mod/s Hennessy.Mod/sxnt ~
-